package chapter1;

/**
 * @author ycj
 * @version 1.0
 * @description: TODO
 * @date 2022/5/16
 */
public class Source1_4 {
    public static void main(String[] args) {
        //创建线程
        Welcome3 welcome3 = new Welcome3();

        //直接调用run方法没有启动线程
        welcome3.run();

        System.out.println("欢迎我是线程="+Thread.currentThread().getName());
        //欢迎我是线程=main
        //欢迎我是线程=main

    }
}


class Welcome3 extends Thread {
    @Override
    public void run() {
        System.out.println("欢迎我是线程="+Thread.currentThread().getName());
    }
}
